import request from '@/utils/request'

// 查询货品存储信息列表
export function listStorage(query) {
  return request({
    url: '/system/storage/list',
    method: 'get',
    params: query
  })
}

// 查询货品存储信息详细
export function getStorage(id) {
  return request({
    url: '/system/storage/' + id,
    method: 'get'
  })
}

// 新增货品存储信息
export function addStorage(data) {
  return request({
    url: '/system/storage',
    method: 'post',
    data: data
  })
}

// 修改货品存储信息
export function updateStorage(data) {
  return request({
    url: '/system/storage',
    method: 'put',
    data: data
  })
}

// 删除货品存储信息
export function delStorage(id) {
  return request({
    url: '/system/storage/' + id,
    method: 'delete'
  })
}

// 导出货品存储信息
export function exportStorage(query) {
  return request({
    url: '/system/storage/export',
    method: 'get',
    params: query
  })
}

// 导出货品出入库报表
export function exportOutInStorage(query) {
    return request({
      url: '/system/product/exportInAndOutStorage',
      method: 'get',
      params: query
    })
  }